-
-
Notifications
You must be signed in to change notification settings - Fork 33.9k
gh-126631: fix pre-loading of __main__ #135295
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
The `main_path` parameter was renamed `init_main_from_name`, update the forkserver code accordingly.
|
|
Remove unnecessary rc check.
…onGH-135295) pythongh-126631: pythongh-137996: fix pre-loading of `__main__` The `main_path` parameter was renamed `init_main_from_name`, update the forkserver code accordingly. This was leading to slower startup times when people were trying to preload the main module. --------- (cherry picked from commit 0912b3a) Co-authored-by: Duane Griffin <[email protected]> Co-authored-by: Gregory P. Smith <[email protected]>
|
Sorry, @duaneg and @gpshead, I could not cleanly backport this to |
|
GH-138607 is a backport of this pull request to the 3.14 branch. |
pythonGH-135295) pythongh-126631: pythongh-137996: fix pre-loading of `__main__` The `main_path` parameter was renamed `init_main_from_name`, update the forkserver code accordingly. This was leading to slower startup times when people were trying to preload the main module. --------- (cherry picked from commit 0912b3a) Co-authored-by: Duane Griffin <[email protected]> Co-authored-by: Gregory P. Smith <[email protected]>
|
GH-138609 is a backport of this pull request to the 3.13 branch. |
#138609) gh-126631: gh-137996: fix pre-loading of `__main__` The `main_path` parameter was renamed `init_main_from_name`, update the forkserver code accordingly. This was leading to slower startup times when people were trying to preload the main module. --------- (cherry picked from commit 0912b3a) Co-authored-by: Duane Griffin <[email protected]>
…onGH-135295) pythongh-126631: pythongh-137996: fix pre-loading of `__main__` The `main_path` parameter was renamed `init_main_from_name`, update the forkserver code accordingly. This was leading to slower startup times when people were trying to preload the main module. --------- Co-authored-by: Gregory P. Smith <[email protected]>
#138607) gh-126631: gh-137996: fix pre-loading of `__main__` (GH-135295) gh-126631: gh-137996: fix pre-loading of `__main__` The `main_path` parameter was renamed `init_main_from_name`, update the forkserver code accordingly. This was leading to slower startup times when people were trying to preload the main module. --------- (cherry picked from commit 0912b3a) Co-authored-by: Duane Griffin <[email protected]> Co-authored-by: Gregory P. Smith <[email protected]> Co-authored-by: Petr Viktorin <[email protected]> Co-authored-by: Gregory P. Smith <[email protected]>
…er_preload` (GH-141859) Add a keyword-only `on_error` parameter to `multiprocessing.set_forkserver_preload()`. This allows the user to have exceptions during optional `forkserver` start method module preloading cause the forkserver subprocess to warn (generally to stderr) or exit with an error (preventing use of the forkserver) instead of being silently ignored. This _also_ fixes an oversight, errors when preloading a `__main__` module are now treated the similarly. Those would always raise unlike other modules in preload, but that had gone unnoticed as up until bug fix PR GH-135295 in 3.14.1 and 3.13.8, the `__main__` module was never actually preloaded. Based on original work by Nick Neumann @aggieNick02 in GH-99515.
The
main_pathparameter was renamedinit_main_from_name, update the forkserver code accordingly.